package com.chixing.day12_date_factory;

/**
 * 该类表示坐标
 * @param <E> 泛型
 *   泛型作用： 数据类型安全性
 *            类型参数化
 */
public class Pointer<E> {
    private E x;
    private E y;

    public Pointer(){}
    public Pointer(E x, E y) {
        this.x = x;
        this.y = y;
    }




    public E getX() {
        return x;
    }

    public void setX(E x) {
        this.x = x;
    }

    public E getY() {
        return y;
    }

    public void setY(E y) {
        this.y = y;
    }

    @Override
    public String toString() {
        return "Pointer{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
